#
# A CentOS 7 image tailored for tmt test suite
#
# tmt/tests/centos/7/upstream:latest
#

FROM quay.io/centos/centos:7

# hadolint ignore=SC2016
RUN <<EOF
set -ex

# Use latest vault repos, mirrors are gone after centos EOL
sed '/mirrorlist/d' -i /etc/yum.repos.d/*repo
sed 's|#baseurl=http://mirror.centos.org/centos/$releasever|baseurl=https://vault.centos.org/7.9.2009|' -i /etc/yum.repos.d/*repo
EOF

RUN <<EOF
set -ex

# Populate yum cache
yum makecache

# Make sure the image is built with the latest packages
yum update -y
EOF
